const supplierFoodsDao = require("../dao/supplierFoodsDao");

//分页
const get = async ({  curPage, eachPage,nameData,sort }) =>
  await supplierFoodsDao.get( { curPage, eachPage,nameData,sort} );

//查询数据
const getall = async () => await supplierFoodsDao.getall();
//查询图片
const getById = async ({_id}) => await supplierFoodsDao.getById({_id});
//更新
const update = async ( _id , params) => await supplierFoodsDao.update(_id, params);

//新增
const create = async supplierfoods=> await supplierFoodsDao.create(supplierfoods);

//删除
const remove=async(_id)=>await supplierFoodsDao.remove(_id);

module.exports = { get, update ,remove,create,getById,getall};
